package com.sirius.meta.mall.product.module.request.handler;

import com.google.common.collect.Lists;
import com.sirius.meta.mall.product.logic.bean.PmsCategory;
import com.sirius.meta.mall.product.logic.service.PmsCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Surging
 * @version 1.0
 * @ClassName PmsCategoryHandler
 * @date 2022/3/16 20:48
 * @desc
 */
@Component
public class PmsCategoryHandler {

    private final PmsCategoryService pmsCategoryService;


    public PmsCategoryHandler(PmsCategoryService pmsCategoryService) {
        this.pmsCategoryService = pmsCategoryService;
    }

    /**
     * @author Surging
     * @Description 查询出所有分类并组装成树形结构
     * @Return java.util.List<com.sirius.meta.mall.product.logic.bean.PmsCategory>       
     * @date 0:18 2022-07-30
     **/
    public List<PmsCategory> getPmsCategoryList() {
        List<PmsCategory> pmsCategoryList = pmsCategoryService.list();

        return pmsCategoryList;
    }
}
